package com.lry;

import java.io.IOException;

public class Start {

    public static void main(String[] args) throws IOException {
        Master master = new Master();

        Slave slave1 = new Slave("slave1");
        slave1.error = true;

        Slave slave2 = new Slave("slave2");
        slave2.error = true;

        Slave slave3 = new Slave("slave3");
        master.register(slave1,slave2,slave3);

        slave1.registerOtherSlave(slave2,slave3);
        slave2.registerOtherSlave(slave1,slave3);
        slave3.registerOtherSlave(slave1,slave2);

        master.setValue(1);

        System.in.read();
    }

}
